package com.feigen.services;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @Auther: hejianding
 * @Date: 2021/3/12 9:34
 * @Version: 1.0
 */
@Service
@FeignClient("USER") //开启Feign客户端，USER是client-user微服务的serviceId
public interface FeignService {

    //对应要调用的client-user微服务控制层请求方法
    @RequestMapping("/user/{id}")
    String getUser(@PathVariable("id") Long id);
}
